package com.example.mqdemo.subscribe;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/*
 *@description: 发布/订阅模式消息接收者2
 *@author: hisen
 *@Time: 2023/11/22  17:17
 */
@Component("subscribeConsumer2")
public class SubscribeConsumer2 {
    @RabbitListener(queues = "subscribe2")
    public void handleMessage(String message) {
        System.out.println("subscribeQueue2收到消息：" + message);
    }
}
